<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8" />
		<title>条件渲染v-show</title>
		<!-- 引入Vue -->
		<script type="text/javascript" src="../js/vue.js"></script>
	</head>
	<body>
		<!-- 准备好一个容器-->
		<div id="demo">
			<h2>当前求和为：{{sum}}</h2>
			<button @click="sum++">sum+1</button>

			<!-- <h2 v-show="false">同学你好</h2> -->
			<!-- <h2 v-show="true">同学你好</h2> -->
			<!-- <h2 v-show="1 === 1">同学你好</h2> -->

			<h2 v-show="sum === 1">Angular</h2>
			<h2 v-show="sum === 2">React</h2>
			<h2 v-show="sum === 3">Vue</h2>
			<h2 v-show="sum > 3">哈哈</h2>
		</div>
	</body>

	<script type="text/javascript">
		Vue.config.productionTip = false //阻止 vue 在启动时生成生产提示。
		
		new Vue({
			el:'#demo',
			data:{
				sum:0
			}
		})
	</script>
</html>